package com.quwan.mapper;

import com.quwan.entity.JobLock;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.quwan.manager.controller.dto.JobLockDTO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * <p>
 * 定时任务锁表 Mapper 接口
 * </p>
 *
 * @author lt
 * @since 2021-11-24
 */
public interface JobLockMapper extends BaseMapper<JobLock> {
    void createTaskLock(@Param("type") Byte type, @Param("date") Date date);

    JobLockDTO selectTaskLock(@Param("type") Byte type);

    int updateLockVersion(@Param("version") Long version, @Param("type") Byte type, @Param("date") Date date);
}
